Repository navigation
feat!: Support getExperimentFlag, trackEvent and trackExposure methods - #214
Conversation
Its entry in Flagsmith/sdk-spec's compatibility matrix at v0.7.1: `core or events or local-evaluation`.
|
Important Review skippedThis PR was authored by a bot without an assigned CodeRabbit review seat. Ask an organization administrator to assign a seat to the bot. See the seat-assignment guide. After the seat is assigned, request a review again.
|
Merging this PR will not alter performance1 warning
Comparing |
Implements the `@events` capability of SDK spec v0.6.0, opt-in with `EnableEvents`: - `GetExperimentFlag` gets an identity's flag and records a `$flag_exposure` for the variant it was served, when the identity is enrolled in a running experiment on the feature. - `TrackEvent` and `TrackExposureEvent` record application events and exposures; `FlushEvents` sends them now. - Events are buffered and sent to the Flagsmith events API in batches, on a timer and when the buffer fills. Equal exposures are sent once per batch; a batch is retried once on a server or connection error, then dropped. - `Flag` exposes the `Variant` and `Experiment` that remote identity evaluation returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 78121ba)
…e ones - Reject a non-positive EventsFlushInterval up front. - FlushEvents now also waits for batches already being sent, e.g. after the buffer filled, so no events are lost on shutdown. - Send logs and drops batches it cannot serialise or send for any other reason, instead of leaving an unobserved exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit eb67c78)
|
The spec run failed because v0.7.1 adds the Changes
Verified locally: build and |
SDK spec v0.7.1 expects a flag whose value is an empty string to be returned as "", not null or a default. Cover it for remote and local evaluation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The last red run on 40dfb66 was not caused by the code. In Changes
Verified locally: |
getExperimentFlag, trackEvent and trackExposure methods
getExperimentFlag, trackEvent and trackExposure methodsgetExperimentFlag, trackEvent and trackExposure methods
getExperimentFlag, trackEvent and trackExposure methodsgetExperimentFlag, trackEvent and trackExposure methods
getExperimentFlag, trackEvent and trackExposure methodsgetExperimentFlag, trackEvent and trackExposure methods
getExperimentFlag, trackEvent and trackExposure methodsgetExperimentFlag, trackEvent and trackExposure methods
getExperimentFlag, trackEvent and trackExposure methodsgetExperimentFlag, trackEvent and trackExposure methods
🤖 I have created a release *beep* *boop* --- ## [10.0.0](v9.1.0...v10.0.0) (2026-11-10) ### ⚠ BREAKING CHANGES * `IFlagsmithClient` has new members `GetExperimentFlag`, `TrackEvent`, `TrackExposureEvent` and `FlushEvents`. Classes that implement `IFlagsmithClient` must implement them. Code that only calls the interface, or mocks it, is unaffected. ### Features * Support `getExperimentFlag`, `trackEvent` and `trackExposure` methods ([#214](#214)) ([af82ba5](af82ba5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Contributes to Flagsmith/sdk-spec#13
BREAKING CHANGE:
IFlagsmithClienthas new membersGetExperimentFlag,TrackEvent,TrackExposureEventandFlushEvents. Classes that implementIFlagsmithClientmust implement them. Code that only calls the interface, or mocks it, is unaffected.